package com.tpod.taxi.service;

import org.json.JSONArray;

import tpod.network.HTTPRequest;
import tpod.network.http.HTTPResponseData;

import com.tpod.taxi.BaseBusinessReponse;
import com.tpod.taxi.entity.City;
import com.tpod.taxi.entity.Taxi;

public class CityReponse extends  BaseBusinessReponse<City>{

	@Override
	public void processResponse(HTTPResponseData data, HTTPRequest request)
			throws Exception {
		super.processResponse(data, request);
		if(this.code==SUCCESS_CODE){
			JSONArray datas = jsonObj.getJSONArray("data");
			for (int i = 0; i < datas.length(); i++) {
				City city = new City();
				this.objects.add(city.valueOfJSON(datas.getJSONObject(i)));
			}
		}		
		
	}
}
